package org.thanos.iot.dao.user;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.thanos.iot.entity.user.SysUser;

public interface SysUserDao extends JpaRepository<SysUser, Integer> {

    @Query(value = "SELECT ID, LOGIN_ID, PASSWORD, NAME, TELEPHONE, EMAIL, STATUS, CREATE_TIME, UPDATE_TIME, VERSION FROM SYS_USER WHERE LOGIN_ID = :loginId", nativeQuery = true)
    SysUser findByLoginId(@Param("loginId") String loginId);

}